package net.teamclerks.rpgf.script.action;

import net.teamclerks.rpgf.script.director.Director;

/**
 * DialogAction is an implementation of Action which is used specifically
 * for Avatar dialogs. For the generic purposes of the DialogAction, this
 * means that the <code>act</code> method will tell the Director
 * to handle the rendering of dialog, and pass the text associated with this
 * DialogAction.<br/><br/>
 * DialogAction is not <code>destructive</code> by default, but setting that
 * to true will cause this dialog to be a 1-time-only dialog.
 * @author msmith
 *
 */
public abstract class DialogAction extends Action
{  
  /// DATAPOINTS ///
  /**
   * The dialog text.
   */
  protected String dialog;
  
  /// PUBLIC CONSTRUCTOR ///
  public DialogAction(Director director)
  {
    super(director);
    this.dialog = "";
  }
  
  /// PUBLIC METHODS ///
  /**
   * Gets the dialog, defaults to empty string.
   * @return dialog
   */
  public final String getDialog()
  {
    return this.dialog;
  }
  /**
   * Sets the dialog, null implies empty string.
   * @param dialog
   */
  public final void setDialog(String dialog)
  {
    if(dialog == null) dialog = "";
    this.dialog = dialog;
  }
}
